home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 51
/
Amiga Format CD51 (2000-03-10)(Future Publishing)(GB)[!][issue 2000-04].iso
/
-in_the_mag-
/
program_perfection
/
vbcc
/
mystartup
/
test.c
< prev
next >
Wrap
C/C++ Source or Header
|
2000-02-16
|
1KB
|
66 lines
/*
* test.c
*
* Test code for my fairly minimal VBCC startup code
*
* (C) Richard Drummond 1999
*
* Please feel free to use and abuse this code in your own
* programs, but don't blame me if it goes wrong . . .
*
* $Id :$
* $Log: test.c,v $
* Revision 1.1.1.1 1999/11/10 22:38:29 richard
* Initial import to cvs
*
*/
#include <dos/dos.h>
#include <proto/dos.h>
#include <stdlib.h>
VOID
atexit_func( VOID )
{
Printf( "atexit_func called.\n" );
}
VOID
_INIT_6_constructor( VOID )
{
Printf( "Constructor called.\n" );
atexit( atexit_func );
}
VOID
_EXIT_6_destructor( VOID )
{
Printf( "Destructor called.\n" );
}
extern APTR WBenchMsg;
int
main( char *command, int length )
{
if( WBenchMsg )
{
BPTR StdOut;
if( StdOut = Open( "CON:20/20/200/100/Test/WAIT/CLOSE", MODE_NEWFILE ) )
{
FPuts( StdOut, "Started from WB.\n" );
Close( StdOut );
}
}
else
Printf( "Started from CLI\nCommand:'%s'\nLength :%ld\n", command, length );
/* just to check the RC is getting through :) */
return RETURN_FAIL;
}